<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.wxtf.platform.plugins.user.*"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
UserBean user = (UserBean)request.getSession().getAttribute("userBean");

String _db = user.getDbType();
String orgId = request.getParameter("orgid");
String type = request.getParameter("type");
String time1 = request.getParameter("time1");
String time2 = request.getParameter("time2");	
//根据column判断具体条件

Map<String,List<Map<String, String>>> dicMap = user.getDicMap();
List<Map<String, String>> list = null;
String temp = "";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>"/>
		<meta http-equiv="pragma" content="no-cache"/>
		<meta http-equiv="cache-control" content="no-cache"/>
		<meta http-equiv="expires" content="0"/>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	
		<link type="text/css" rel="stylesheet" href="ligerUI/skins/Aqua/css/ligerui-all.css" />
		<link type="text/css" rel="stylesheet" href="ligerUI/skins/<%=user.getUserCss()%>/css/ligerui-all.css" />
		<link type="text/css" rel="stylesheet" href="ligerUI/skins/ligerui-icons.css" />
		<link type="text/css" rel="stylesheet" href="resource/css/style.css" />
	
		<script type="text/javascript" src="js/jquery/jquery-1.7.2.js"></script>
		<script type="text/javascript" src="ligerUI/js/core/base.js"></script>
		<script type="text/javascript" src="ligerUI/js/ligerui.min.js"></script>
		<script type="text/javascript" src="js/common.js"></script>
		<script type="text/javascript" src="js/validata.js"></script>

		<script type="text/javascript" src="ligerUI/js/plugins/ligerGrid.js"></script>
		<script type="text/javascript" src="ligerUI/js/plugins/ligerTree.js"></script>
		<script type="text/javascript" src="ligerUI/js/plugins/ligerForm.js"></script>
		<script type="text/javascript" src="ligerUI/js/plugins/ligerDateEditor.js"></script>
	
		<script type="text/javascript">
			var _db = '<%=_db%>';
			_jsonObj.classname = "com.wxtf.platform.main.jcqkgl.emptongji_Action";
			_jsonObj.methodname = "queryEmployee";
			_jsonObj.logicdata = "[{\"types\":\"init\",\"type\":\"<%=type%>\",\"orgIds\":\"<%=orgId%>\",\"time1\":\"<%=time1%>\",\"time2\":\"<%=time2%>\"}]";
			$(function(){
				manager = $("#emp-grid").ligerGrid({
					url: _url, parms: _jsonObj, width: '100%', height: '100%',
					usePager: true, rownumbers: true, checkbox: false, alternatingRow: true,
					columns: [
						{ display: '机构名称', name: 'reserve1', width:150, align:'left' },
						{ display: 'tbe_id', name: 'tbe_id', hide: true,width:1 },
						{ display: 'org_id', name: 'org_id', hide: true,width:1 },
						{ display: '姓名', name: 'tbe_name', width: 100, align: 'left'},
						{ display: '性别', name: 'tbe_sex', width: 60, align: 'left' },
						{ display: '年龄', name: 'tbe_age', width: 1, hide:true },
						{ display: '出生日期', name: 'tbe_birthday', width: 100, align: 'left' },
						{ display: '民族', name: 'tbe_nation', width:  1, hide:true },
						{ display: '身份证号', name: 'tbe_idcard', width: 180, align: 'left' },
						{ display: '职工证号', name: 'tbe_work_permit',hide: true,width:1},
						{ display: '用工形式', name: 'tbe_employment_forms', width: 1, hide:true },
						{ display: '曾用名', name: 'tbe_former_name', hide: true,width:1},
						{ display: '拼音码', name: 'tbe_spell_code', hide: true,width:1},
						{ display: '出生地', name: 'tbe_birthplace',hide: true,width:1},
						{ display: '入厂时间', name: 'tbe_join_time', width:  1, hide:true },
						{ display: '工龄', name: 'tbe_seniority', width:  1, hide:true },
						{ display: '手机', name: 'tbe_mobile', width: 1, hide:true },
						{ display: '家庭住址', name: 'tbe_address', width: 200, align: 'left' },
						{ display: '家庭电话', name: 'tbe_family_phone', width: 100, align: 'left' },
						{ display: '籍贯', name: 'tbe_native_palce', width: 100, align: 'left' },
						{ display: '婚姻状态', name: 'tbe_marital_status', width: 100, align: 'left',
							render: function(record, index, value, oth){
								<%
								list = dicMap.get("27");
								temp = "";
								if(null != list && list.size() > 0){
									for(Map<String, String> map: list){
								%>
								if(value == '<%=map.get("tmgd_id")%>'){
									<%
									temp = map.get("tmgd_name");
									%>
									return '<%=temp%>';
								}
								<%
									}
								}
								%>
								return value;
							}
						},
						{ display: '婚姻状况', name: 'tbe_marital_condition', width: 1, hide:true },
						{ display: '结婚时间', name: 'tbe_married_time', width: 100, align: 'left'},
						{ display: '结婚证号', name: 'tbe_marriage_certificate', width: 100, align: 'left' },
						{ display: '政治面貌', name: 'tbe_political_status', width:  1, hide:true },
						{ display: '学历', name: 'tbe_qualification', width:  1, hide:true },
						{ display: '毕业学校', name: 'tbe_graduate_college', width:  1, hide:true },
						{ display: '所学专业', name: 'tbe_major', width:  1, hide:true },
						{ display: '工作时间', name: 'tbe_work_area', width:  1, hide:true },
						{ display: '职务', name: 'tbe_position', width:  1, hide:true },
						{ display: '是否允许再生育', name: 'tbe_is_again_birth', width:  1, hide:true },
						{ display: '是否不孕症', name: 'tbe_is_barrenness', width:  100, align: 'left',
							render: function(record, index, value, oth){
								if(value == 1){
									return "是";
								}else{
									return "否";
								}
							}
						},
						{ display: '是否绝经', name: 'the_is_menopause', width:  60, align: 'left',
							render: function(record, index, value, oth){
								if(value == 1){
									return "是";
								}else{
									return "否";
								}
							}
						},
						{ display: '是否晚婚', name: 'tbe_is_late_marriage', width:  60, align: 'left',
							render: function(record, index, value, oth){
								if(value == 1){
									return "是";
								}else{
									return "否";
								}
							}
						},
						{ display: '是否晚育', name: 'tbe_is_late_birth', width:  1, hide:true },
						{ display: '员工状态', name: 'tbe_status', width:  1, hide:true },
						{ display: '生育能力状态', name: 'tbe_ba_status', width:  1, hide:true },
						{ display: '节育措施', name: 'tbe_birth_control_measures', width:  120, align: 'left',
							render: function(record, index, value, oth){
								<%
								list = dicMap.get("104");
								temp = "";
								if(null != list && list.size() > 0){
									for(Map<String, String> map: list){
								%>
								if(value == '<%=map.get("tmgd_id")%>'){
									<%
									temp = map.get("tmgd_name");
									%>
									return '<%=temp%>';
								}
								<%
									}
								}
								%>
								return value;
							}
						},
						{ display: '设为重点时间', name: 'tbe_es_time', width:  1, hide:true },
						{ display: '是否重点服务对象', name: 'tbe_is_es', width:  120, align: 'left',
							render: function(record, index, value, oth){
								if(value == 1){
									return "是";
								}else{
									return "否";
								}
							}
						},
						{ display: '重点理由', name: 'tbe_es_reason', width:  1, hide:true },
						{ display: '子女情况', name: 'tbe_children_status', width:  1, hide:true },
						{ display: '排序号', name: 'tbe_order', width:  1, hide:true },
						{ display: '备注', name: 'tbe_memo', width:  1, hide:true },
						{ display: 'reserve2', name: 'reserve2', width:  1, hide:true },
						{ display: 'reserve3', name: 'reserve3', width:  1, hide:true },
						{ display: 'reserve4', name: 'reserve4', width:  1, hide:true },
						{ display: 'reserve5', name: 'reserve5', width:  1, hide:true },
						{ display: '录入人', name: 'create_by', width:  1, hide:true },
						{ display: '录入时间', name: 'create_time', width:  1, hide:true },
						{ display: '最后修改人', name: 'last_modify_by', width:  1, hide:true },
						{ display: '最后修改时间', name: 'last_modify_time', width: 1, hide:true }
					]
				});
            });
            
		</script>
	</head>
  
  	<body>
  		<center><h2 style="display:block;padding:10px 0;">职工详细信息</h2></center>
	    <div id="emp-grid"></div>
	</body>
</html>
